package com.lianzhihui.romeex.widget.dialog;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.lianzhihui.romeex.R;
import com.lianzhihui.romeex.inter.DialogListener;
import com.lianzhihui.romeex.ui.base.BaseDialog;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Description: 密码验证通用 弹窗
 * Author: RAMON
 * CreateDate: 2020/9/10 10:06 AM
 * UpdateUser:
 * UpdateDate:
 * UpdateRemark:
 * Version:
 */
public class ZZFailDialog extends BaseDialog {

    @BindView(R.id.tv_title)
    TextView titleTv;
    @BindView(R.id.warning)
    TextView warning;
    @BindView(R.id.tv_sum)
    TextView tv_sum;

    @BindView(R.id.bt_yes)
    Button bt_yes;
    String address;
    DialogListener listener;

    public ZZFailDialog(@NonNull Activity activity) {
        super(activity);
    }

    public void setListener(DialogListener listener) {
        this.listener = listener;
    }

    @Override
    protected int provideViewId() {
        return R.layout.dialog_zz_fail;
    }

    @SuppressLint("SetTextI18n")
    public void setSum(double sumD, String unit) {
        tv_sum.setText(sumD + " " + unit);
    }
    @SuppressLint("SetTextI18n")
    public void setSum(String sumD, String unit) {
        tv_sum.setText(sumD + " " + unit);
    }
    @Override
    protected void initView() {


    }


    public void setTitle(String title) {
        titleTv.setText(title);
    }

    @OnClick({R.id.bt_yes})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.bt_yes:
                dismiss();
                break;
            default:
                break;
        }
    }

}
